﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq.Mapping;
using System.Data.Linq;
namespace MRSite.Entity
{
    /// <summary>
    /// 转换明细
    /// </summary>
    [Table(Name = "transform")]
    public class Transform : Entity
    {
        /// <summary>
        ///
        /// </summary>
        [Column(Name = "id", IsPrimaryKey = true, CanBeNull = false, IsVersion = true)]
        public override int id { get; set; }

        
             /// <summary>
        /// 转换用户id
        /// </summary>
        [Column(Name = "zzuserid")]
        public int zzuserid { get; set; }

        /// <summary>
        /// 转换用户名
        /// </summary>
        [Column(Name = "zzusername")]
        public string zzusername { get; set; }

        /// <summary>
        /// 收款用户id
        /// </summary>
        [Column(Name = "mbuserid")]
        public int mbuserid { get; set; }

        /// <summary>
        /// 收款用户名
        /// </summary>
        [Column(Name = "mbusername")]
        public string mbusername { get; set; }


        /// <summary>
        /// 金额
        /// </summary>
        [Column(Name = "fee")]
        public Decimal fee { get; set; }

          /// <summary>
        /// 价格
        /// </summary>
        [Column(Name = "price")]
        public Decimal price { get; set; }

          /// <summary>
        /// 数量
        /// </summary>
        [Column(Name = "num")]
        public Decimal num { get; set; }

        

        /// <summary>
        /// 交易类型
        /// </summary>
        [Column(Name = "typefee")]
        public String typefee { get; set; }

        /// <summary>
        ///
        /// </summary>
        [Column(Name = "remark")]
        public String remark { get; set; }

        /// <summary>
        ///
        /// </summary>
        [Column(Name = "addtime",IsDbGenerated=true)]
        public DateTime addtime { get; set; }

        private EntityRef<Customer> _member;
        /// <summary>
        /// 
        /// </summary>
        [Association(Storage = "_member", ThisKey = "zzuserid", OtherKey = "id")]
        public Customer ZzCustomerItem
        {
            get { return this._member.Entity; }
            set { this._member.Entity = value; }
        }
    }
}
